<%@ page contentType="text/html; charset=Windows-31J" language="java" %>
<%@ include file="../inc/common.jsp" %>

<html:html locale="true">
<HEAD>
	<html:base/>
	<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
	<TITLE><%=Globals.get("WEB_PAGETITLE")%></TITLE>
</HEAD>
<BODY BGCOLOR=<%=Globals.get("WEB_BODY_BGCOLOR")%> LINK=<%=Globals.get("WEB_BODY_LINK")%> VLINK=<%=Globals.get("WEB_BODY_VLINK")%>>
<CENTER>
<H4>検索結果一覧</H4><HR>
</CENTER>

<logic:greaterThan name="SearchDailyReportConditionActionForm" property="maxPage" value="0">
	<bean:define id="maxPage" name="SearchDailyReportConditionActionForm" property="maxPage" type="java.lang.Integer" />
	<bean:define id="nowPage" name="SearchDailyReportConditionActionForm" property="nowPage" type="java.lang.Integer" />
	<logic:greaterThan name="SearchDailyReportConditionActionForm" property="nowPage" value="1">
		<bean:define id="count" value="<%=String.valueOf(nowPage.intValue()-1)%>" type="java.lang.String" />
		<html:link page="/search_dailyReport_condition.do" paramId="nowPage" paramName="count" name="params"><<</html:link>
	</logic:greaterThan>

	<%for(int i = 0; i < maxPage.intValue(); i ++){%>
		<logic:notEqual name="SearchDailyReportConditionActionForm" property="nowPage" value="<%=String.valueOf(i+1)%>">
			<bean:define id="count" value="<%=String.valueOf(i+1)%>" type="java.lang.String" />
			<html:link page="/search_dailyReport_condition.do" paramId="nowPage" paramName="count" name="params"><%=i+1%></html:link>
		</logic:notEqual>
		<logic:equal name="SearchDailyReportConditionActionForm" property="nowPage" value="<%=String.valueOf(i+1)%>">
			<%=i+1%>
		</logic:equal>
	<%}%>

	<logic:lessThan name="SearchDailyReportConditionActionForm" property="nowPage" value="<%=maxPage.toString() %>">
		<bean:define id="count" value="<%=String.valueOf(nowPage.intValue()+1)%>" type="java.lang.String" />
		<html:link page="/search_dailyReport_condition.do" paramId="nowPage" paramName="count" name="params">>></html:link>
	</logic:lessThan>
</logic:greaterThan>

<TABLE cellpadding="1" cellspacing="1" border="1">
<TR>
	<TH>No</TH>
	<TH>氏名</TH>
	<TH>作業日</TH>
	<TH>作業時間合計</TH>
	<TH>休憩時間合計</TH>
	<TH>作業-休憩</TH>
</TR>
<logic:iterate id="list" name="searchDailyReportList" scope="request" indexId="index">
<bean:define id="wt" name="list" property="totalWorkHours" type="java.lang.Double" />
<bean:define id="rt" name="list" property="restTime" type="java.lang.Double" />
<TR>
	<TD align="right"><%=index.intValue()+1%></TD>
	<TD>
		<html:link action="/search_dailyReport_info" paramId="dailyReportId" paramName="list" paramProperty="dailyReportId" scope="request" target="newWindow1">
			<bean:write name="list" property="name" />
		</html:link>
	</TD>
	<TD align="right"><bean:write name="list" property="workDate" format="yyyy年MM月dd日"/></TD>
	<TD align="right"><bean:write name="list" property="totalWorkHours" /></TD>
	<TD align="right"><bean:write name="list" property="restTime" /></TD>
	<TD align="right"><% out.write(Double.toString(wt.doubleValue() - rt.doubleValue())); %></TD>
</TR>
</logic:iterate>

</TABLE>

<logic:greaterThan name="SearchDailyReportConditionActionForm" property="maxPage" value="0">
	<bean:define id="maxPage" name="SearchDailyReportConditionActionForm" property="maxPage" type="java.lang.Integer" />
	<bean:define id="nowPage" name="SearchDailyReportConditionActionForm" property="nowPage" type="java.lang.Integer" />
	<logic:greaterThan name="SearchDailyReportConditionActionForm" property="nowPage" value="1">
		<bean:define id="count" value="<%=String.valueOf(nowPage.intValue()-1)%>" type="java.lang.String" />
		<html:link page="/search_dailyReport_condition.do" paramId="nowPage" paramName="count" name="params"><<</html:link>
	</logic:greaterThan>

	<%for(int i = 0; i < maxPage.intValue(); i ++){%>
		<logic:notEqual name="SearchDailyReportConditionActionForm" property="nowPage" value="<%=String.valueOf(i+1)%>">
			<bean:define id="count" value="<%=String.valueOf(i+1)%>" type="java.lang.String" />
			<html:link page="/search_dailyReport_condition.do" paramId="nowPage" paramName="count" name="params"><%=i+1%></html:link>
		</logic:notEqual>
		<logic:equal name="SearchDailyReportConditionActionForm" property="nowPage" value="<%=String.valueOf(i+1)%>">
			<%=i+1%>
		</logic:equal>
	<%}%>

	<logic:lessThan name="SearchDailyReportConditionActionForm" property="nowPage" value="<%=maxPage.toString() %>">
		<bean:define id="count" value="<%=String.valueOf(nowPage.intValue()+1)%>" type="java.lang.String" />
		<html:link page="/search_dailyReport_condition.do" paramId="nowPage" paramName="count" name="params">>></html:link>
	</logic:lessThan>
</logic:greaterThan>

<BR>
<H5><html:link forward="site_top" target="_parent">TOPに戻る</html:link></H5>

</BODY>
</html:html>
